      Subroutine DualInit
      ! Only for initialzing the location
      ! Only 2D case implemented
      include "param.fi"
      include "common.fi"

      Integer I, J, IJ

      Do I = 1, GridDual
        Do J = 1, GridDual
          IJ = (J-1)*GridDual + I
          X1Dual(IJ) = (Real(I) - 1.0) * DXDual
          X3Dual(IJ) = (Real(J) - 1.0) * DXDual
        Enddo
      Enddo

      End Subroutine

C===========================================================================

      Subroutine Calc_dRho_dT_Dual
      include "param.fi"
      include "common.fi"

      Integer I

      Do I = 1, NTOT3T
        Temp1(I) = - Rho(I) * (DU1DX(I) + DU3DZ(I))
      Enddo
      End Subroutine
C===========================================================================

      Subroutine Calc_dU_dT_Dual
      include "param.fi"
      include "common.fi"

      Integer I

      Do I = 1, NTOT3T
        Temp1(I) = - DPDX(I) / Rho(I)
        Temp3(I) = - DPDZ(I) / Rho(I)
      Enddo
      End Subroutine
